﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SharingCenter.Web.Shared
{
    public partial class AlbumUpload : System.Web.UI.UserControl
    {
        public event EventHandler<EventArgs> OkButtonClicked;
        private Guid albumId;
        protected string albumIdQueryStringField = string.Empty;
        public Guid AlbumId { get { return albumId; } set { albumId = value; } }
        public string AlbumIdQueryStringField { get { return albumIdQueryStringField; } set { albumIdQueryStringField = value; } }
        private string cssClass = string.Empty;
        public string CssClass { get { return cssClass; } set { cssClass = value; } }

        public event EventHandler<EventArgs> UploadComplete;
        protected void Page_Init(object sender, EventArgs e)
        {
            LinkButton1.Click += new EventHandler(LinkButton1_Click);
        }

        void LinkButton1_Click(object sender, EventArgs e)
        {
            OkButtonClicked(this, new EventArgs());
        }

        protected void Page_PreRender(object sender, EventArgs e)
        {
            if (cssClass != string.Empty)
            {
                Panel1.CssClass = cssClass;
            }
        }
    }
}